Magatsuhi no kami (禍津日神)
"Magatsuhi no kami (or Magatsui no kami)" is a Shinto god. Maga means disaster, tsu means 'of,' and hi means divine spirit, thus Magatsuhi means god of disaster.
Magatsuhi no kami was born during kamiumi (the creation of gods) when Izanagi returned from hell and exorcised the impurity of hell in a purification ceremony, and while he (or she) is described as the two gods, Yasomagatsuhi no kami and Omagatsuhi no kami in the Kojiki (Records of Ancient Matters), a document in the sixth part of column five in the Nihon Shoki (Chronicles of Japan) describes him (or her) as Yasomagatsuhi no kami. These gods were born from the impurity of hell, and are gods governing disasters. According to mythology, after Magatsuhi no kami was born, the two gods of Naobi no kami and Izunome were born to fix the disaster. In a document in the tenth part of the same column in the Nihon Shoki, Izanagi spurt out Oayatsuhi no kami. There is no description about this being born from impurity, but oaya has the same meaning as a major disaster (omaga), and is considered to be of similar divinity as Omagatsuhi no kami.
Later, it was believed that by worshipping this god, disaster can be avoided, and this god was honored as the guardian deity for warding off evil. In this case, Naobi no kami is often enshrined together with Magatsuhi no kami.
Oyabiko no kami, the child of Izanagi and Izanami, and whose 'oya' is believed to have come from 'oaya,' but with the 'a' dropped, is considered to be of similar divinity as Oayatsuhi no kami (Omagatsuhi no kami). Isotakeru no kami, who is the child of Susanoo, and to whom Onamuji escaped in the myth of Okuninushi, was originally believed to be a different god, but in some cases believed to be the same god.
Additionally, Atsutane HIRATA considers Omagatsuhi no kami, Yasomagatsuhi no kami, and Oyabiko no kami as the same god as Seoritsuhime no kami, one of the Haraedo no kami gods (the gods at the purification place).
Theological position in Fukko (restoration, reform) Shinto
Norinaga MOTOORI believed Magatsuhi no kami is an evil god. According to Norinaga, Magatsuhi no kami is the cause of absurdity in life. In this world, people's weals and woes do not necessarily occur reasonably. He claimed that it is the works of Magatsuhi no kami that causes people living in good faith to not necessarily be blessed with happiness. He says, 'Magatsuhi no kami has a harsh spirit, and it is very sad, but there is nothing to be done.' ("Naobinomitama").
On the other hand, Atsutane HIRATA considered Magatsuhi no kami to be a god of goodness. According to Atsutane, Magatsuhi no kami is the aramitama (ferocious, rough, and violent side of the spirit) of Susanoo no mikoto. He claimed that all humans have in their hearts, a portion of the divine spirit of Magatsuhi no kami and a portion of the divine spirit of Naobi no kami (who Atsutane considers is the nikitama - peaceful side of the spirit - of Amaterasu Omikami). When people face evil and impurity, and respond with anger, hatred, and harshness, it is the act of the portion of the divine spirit of Magatsuhi no kami in their hearts. Thus, he (or she) is a god governing the function which judges evil as evil in people's hearts. He also explained that such anger was calmed over time by the portion of the divine spirit of Naobi no kami.